package cn.platform.controller;

import cn.platform.response.AResponse;
import cn.platform.service.HarmonyService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@CrossOrigin(maxAge = 3600) //允许跨域请求
@Controller
@RequestMapping("/api/harmony")
public class HarmonyController {
    @Resource
    HarmonyService harmonyService;

    /**
     * 根据用户token查询用户id
     *
     * @return AResponse res 用户的信息
     * @author jyz
     */
    @PostMapping("/get-id")
    @ResponseBody
    public AResponse listHarmonyAccount(){
        return harmonyService.getRole();
    }
}
